<?php
 if (!defined('baseinfo')) {
    exitdata();
}  
?>
<div class="sB sBL clBg2 userSlctNone">
    <div class="sBLShdw"></div>
    <div class="wrpInSB">
        <div class="secTopSB clBd2 bdBtm w232">
            <form class="frmSrch" id="frmSrchData">
                  <input type="text" name="qSrch" id="qSrch" value="<?=$data['searchtext']?>" placeholder="Search" autocomplete="off" class="srchTopInp clBd2 fs02">
                  <div class="wrpBtnSrch">
                    <input type="submit" value="" class="srchSbmt">
                    <span class="srchIcon ico"></span>
                  </div>
            </form>
        </div>
        <div class="wrpSecList w232">
            <div class="secWrpList btnSBPf" onclick="toggleUserMenu();setcookiestate()">

                <img src="<? if(count($data['user'])){echo $data['user']['simguser'];}else {echo baseinfo.'/img/dfthmbuser.jpg';} ?>" alt="" width="24" height="24" class="imgSBPf">
                <h3 class="nameSBPf cutTxt fs03 clTxt1"><? if(count($data['user'])){ echo $data['user']['displayname'];   }else { echo "Guest"; }?></h3>
                <span class="ico  icoArwUpUser <?if($_COOKIE['stateclick']==2){?>icoArwDwnUser<?}?>"></span>
            </div>
            <div class="secWrpList navUserItem w232" <?if($_COOKIE['stateclick']==2){?> style="display: none;" <?}?> >
                <h4 class="sprSec clTxt1 clBd2" >account</h4>
                <ul class="grpSecListItem fs03">
                    <?
                    

                    if(count($data['user'])==0||$data['user']['roleid']!=4){?>
                    <li class="listItem"><a class="btnLstSBL btnLstLI" data-href="Log In">Log In</a></li>
                    <li class="listItem"><a class="btnLstSBL btnLstSU" data-href="Sign Up">Sign Up</a></li>
                    <?}else{?>
                    <li class="listItem"><a data-href="DM List" class="btnLstSBL">DM List</a></li>
                    <li class="listItem"><a data-href="Log Out" href="<?=serviceinfo.'logout?linkto='.$data['urlnowset']?>&nojson=1" class="btnLstSBL">Log Out</a></li>
                    <?}?>
                </ul>
                

            </div>

            
            
        </div>
    </div>
    <div class="secAddfix clBg2">
    <?if(count($data['user'])!=0){?>
        <div class="btnAddSB fs05 clBd2 cutTxt">
            <div class="wrpUploadCn clearfix">
                <span class="ico3"></span>
                <span class="txtUlCn">Upload</span>
            </div>
        </div>
    <?}?>
      
        <div class="spCrdt fs00">
            <span class="cpR"><?if (defined('FooterData')) {  echo FooterData;?><?}else{?>2013 © Infostant  <?}?></span>
            <div class="wrpSecCrdt fs00">
              <span class="cpVer">ver <?=$data['version']?></span>
                <!-- <a href="/about" class="btnRBtm">About Us</a> -->
            </div>
        </div>
    </div>
</div>
<script>
<?if(count($data['user'])==0||$data['user']['roleid']!=3){?>
 $( document ).ready(function() { 
  $(".btnIco.btnCncl.closeLS").remove();
  $('.ovlPopGen.wrpPopLI').fadeIn();
 });
 <?}?>
</script>
